#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	struct Student
	{
		char name[20];
		int age;
		long num;
		int score;
	};
	struct Student stu[5];

	int i = 0;
	printf("please input five students information:\n");
	for (i = 0; i < 5; i++)
	{
		scanf("%s%d%ld%d", stu[i].name, &stu[i].age, &stu[i].num, &stu[i].score);
	}
	const int n = 5;
	int k = 0;
	int j = 0;
	struct Student t;
	for (i = 0; i < n - 1; i++)
	{
		k = i;
		for (j = i + 1; j < n; j++)
			if (stu[k].score > stu[j].score)
				k = j;

		t = stu[i];
		stu[i] = stu[k];
		stu[k] = t;
	}
	printf("\nmax score student:%s age:%d number:%8ld score:%d", stu[4].name, stu[4].age, stu[4].num, stu[4].score);
	return 0;
}